#include <fstream>
#include <iostream>
#include <vector>

struct point
{
	long double x, y;
    point() {};
	point(long double x, long double y = 0): x(x), y(y) {};
};

double sq_dist(point& a, point& b)
{
	return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
}

int main() 
{
	size_t n;
	std::cin >> n;
	std::vector<point> points;

	for (size_t i = 0; i < n; ++i) 
	{
		long double x, y;
		std::cin >> x >> y;
		points.push_back(point(x, y));
	}

	int m;
	std::cin >> m;
    long double max_dist = sq_dist(points[1], points[0]);
    size_t ans1 = 0, ans2 = 1; 
	for (size_t i = 0; i < n; ++i) 
	{
        for (size_t j =  i + 1; j < n; ++j)
            if (sq_dist(points[i], points[j]) > max_dist)
            {
                max_dist = sq_dist(points[i], points[j]);
                ans1 = i;
                ans2 = j;
            }
	}
    std::cout.precision(20);
    std::cout << points[ans1].x << " " << points[ans1].y << "\n";
    std::cout << points[ans2].x << " " << points[ans2].y << "\n";
	return 0;
}